ARG REDIS_VERSION
FROM redis:${REDIS_VERSION}

RUN apt-get update
RUN apt-get install vim -y
RUN apt-get install net-tools -y
RUN apt-get install iputils-ping -y
RUN mkdir -p /usr/local/etc/redis
COPY redis.conf /usr/local/etc/redis/redis.conf

VOLUME /data

CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]

EXPOSE 6379
